<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <link rel="stylesheet" type="text/css" href="__CSS__/lib/normalize.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/mui-3.6.1.min.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/activities.css" />
    <link rel="stylesheet" href="__CSS__/my_pullrefresh.css" type="text/css">
    <title>限时秒杀</title>
</head>

<body>
    <div class="mui-content">
        <div class="top-bar mui-row">
            <div class="return mui-col-sm-2 mui-col-xs-2" onclick="javascript:location.href='/Wx/Index/index'"></div>
            <div class="top-middle mui-col-sm-8 mui-col-xs-8">
                <div class="s-top-middle">
                    限时秒杀
                </div>
            </div>
            <div class="top-right mui-col-sm-2 mui-col-xs-2"></div>
        </div>
    </div>
    <div class="top-tab">
       <ul>
           <volist name="dateList" id="datelist">

                   <if condition="$datelist.state eq '抢购中'">
                      <li class="top-tab-active"><p>{$datelist.time}</p><p>{$datelist.state}</p><span class="top-tab-icon top-tab-icon-active"></span></li>
                   <else />
                       <li><p>{$datelist.time}</p><p>{$datelist.state}</p><span class="top-tab-icon"></span></li>
                   </if>

           </volist>
       </ul>
    </div>

    <div>

    <volist name="goodslist" id="list">
        <div class="f-muii-content" <if condition="$list.isShow eq 1">style="display:block"<else/>style="display:none"</if>>
        <div class="timediv"><span class="timespan"></span></div>
            <volist name="list.info" id="vo">
            <div class="mui-content">
                <div class="goods mui-row">
                    <div class="mui-col-xs-4 mui-col-sm-4" <if condition="$vo.disable eq 1">onclick="javascript:location.href='{:U("goods/index",array("goodsId"=>$vo[goodsId],"secKill"=>1))}'"</if>>
                        <div class="goods-img" style="background: url(/{$vo.goodsThums}) no-repeat;background-size:cover;background-position:center;"></div>
                    </div>
                    <div class="mui-col-xs-4 mui-col-sm-4">
                        <div class="clock-top">{$vo.goodsName}</div>
                        <div class="clock-middle"><span>限时价</span><span class="new-price">&nbsp;¥{$vo.seckillPrice}&nbsp;</span><span class="old-price">原价<span>¥{$vo.shopPrice}</span></span>
                        </div>
                        <if condition="$vo.disable eq 1">
                            <div class="jsy">仅剩余<span>{$vo.seckillStock}</span>{$vo.goodsUnit}</div>
                            <else />
                            <div class="jsy jsy-disable">仅剩余<span>{$vo.seckillStock}</span>{$vo.goodsUnit}</div>
                        </if>
                    </div>
                    <div class="mui-col-xs-4 mui-col-sm-4">
                        <if condition="$vo.disable eq 1">
                            <div class="msq" onclick="add2Car({$vo.goodsId},{$vo.shopId})">{$vo.state}</div>
                            <else />
                            <div class="msq msq-disable">{$vo.state}</div>
                        </if>
                    </div>
                </div>
            </div>
            </volist>
        </div>
    </volist>
    </div>
    <script type="text/javascript" src="__JS__/jquery2.1.1.min.js"></script>
    <script type="text/javascript" src="__JS__/mui.js"></script>
    <script type="text/javascript" src="__JS__/activities.js"></script>
    <script type="text/javascript" src="__JS__/cart.js"></script>
    <script>
        var starttime = new Date({$getTime});//倒计时
    </script>
    <script>
        function add2Car(goodsId,shopId){
            var data = {'goodsId':goodsId,'gcount':1,'goodsAttrId':0,'isGroup':0,'isSeckill':1,'shopId':shopId};
            $.post("/Wx/Cart/addCart",data,function(res){
                    console.log(data);
                if(res['status']<0){
                    mui.toast(res['msg']);
                    return false;
                }
                location.href="/wx/Confirm/conFirmOrder/shopId/"+shopId+"/goodsId/"+goodsId+"/isSeckill/1";
            },'json');
        }
    </script>
</body>

</html>
